package com.runfast.waimai.service.impl;

import com.runfast.common.service.BaseService;
import com.runfast.waimai.dao.mapper.BaseUserRoleMapper;
import com.runfast.waimai.dao.model.BaseRole;
import com.runfast.waimai.dao.model.BaseUser;
import com.runfast.waimai.dao.model.BaseUserRole;
import com.runfast.waimai.dao.model.BaseUserRoleExample;
import com.runfast.waimai.service.BaseUserRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseUserRoleServiceImpl extends BaseService<BaseUserRole, Integer, BaseUserRoleExample> implements BaseUserRoleService {
    public List<Integer> queryRoleIdList(Integer userId){
        BaseUserRoleMapper baseUserRoleMapper=(BaseUserRoleMapper)this.mapper;
        return baseUserRoleMapper.queryRoleIdList(userId);
    }

    public List<BaseUser> queryUserList(Integer rId){
        BaseUserRoleMapper baseUserRoleMapper=(BaseUserRoleMapper)this.mapper;
        return baseUserRoleMapper.queryUserList(rId);
    }

    public List<Integer> queryUserIdList(Integer rId){
        BaseUserRoleMapper baseUserRoleMapper=(BaseUserRoleMapper)this.mapper;
        return baseUserRoleMapper.queryUserIdList(rId);
    }

    public List<BaseRole> queryRoleList(Integer userId){
        BaseUserRoleMapper baseUserRoleMapper=(BaseUserRoleMapper)this.mapper;
        return baseUserRoleMapper.queryRoleList(userId);
    }

}